package com.itheima;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;
@Component
public class Student {
    @Value("张三丰")
    private String name;
    @Value("21")
    private int age;
    @Value("阅读,音乐,读书")
    private List<String> aihaolist;
    @Value("100")
    private Double score;
    @Resource(name = "dog")
    private Dog dog;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public List<String> getAihaolist() {
        return aihaolist;
    }

    public void setAihaolist(List<String> aihaolist) {
        this.aihaolist = aihaolist;
    }

    public Dog getDog() {
        return dog;
    }

    public void setDog(Dog dog) {
        this.dog = dog;
    }

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", aihaolist=" + aihaolist +
                ", dog=" + dog +
                ", score=" + score +
                '}';
    }
}
